﻿using System;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;
using Nardax.Azure.StorageClient;

namespace Nardax.Azure
{
    public class CloudStorageAccountWrapper: ICloudStorageAccount
    {
        private readonly CloudStorageAccount _cloudStorageAccount;

        public CloudStorageAccountWrapper(CloudStorageAccount cloudStorageAccount)
        {
            _cloudStorageAccount = cloudStorageAccount;
        }

        public ICloudBlobClient CreateCloudBlobClient()
        {
            throw new NotImplementedException();
        }

        public ICloudQueueClient CreateCloudQueueClient()
        {
            return new CloudQueueClientWrapper(_cloudStorageAccount.CreateCloudQueueClient());
        }

        public ICloudTableClient CreateCloudTableClient()
        {
            throw new NotImplementedException();
        }

        public Uri BlobEndpoint { get { return _cloudStorageAccount.BlobEndpoint; }}

        public StorageCredentials Credentials { get { return _cloudStorageAccount.Credentials; } }

        public Uri QueueEndpoint { get { return _cloudStorageAccount.QueueEndpoint; } }

        public Uri TableEndpoint { get { return _cloudStorageAccount.TableEndpoint; } }

        public string ToString(bool exportSecrets)
        {
            return _cloudStorageAccount.ToString(exportSecrets);
        }

        public override string ToString()
        {
            return _cloudStorageAccount.ToString();
        }
    }
}
